﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FrmCategorias.aspx.cs" Inherits="PharmacyWeb.Almacen.FrmCategorias" %>
<%@ Import Namespace="PharmacyWeb.Almacen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView ID="fvCategoria" runat="server" DefaultMode="edit" ItemType="PharmacyBussinesEntities.Categoria"
        SelectMethod="GetCategoria"
        UpdateMethod="ActualisarCategoria"
        InsertMethod="AddCategoria">
        <EditItemTemplate>
            <fieldset>
                <div class="panel-primary">
                    <div class="panel-heading">
                        <h2 class="panel-title">Editar Categoria</h2>
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-6 control-label">ID: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TxtId" ReadOnly="True" Text="<%#BindItem.Id %>" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label">Nombre: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TextBox1" Text="<%#BindItem.Nombre %>" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label">Descripcion: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TextBox2" Text="<%#BindItem.Descripcion %>" CssClass="form-control" runat="server" TextMode="MultiLine"></asp:TextBox>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <div class="col-sm-4">
                                <asp:Button Text="Guardar" CssClass="btn btn-success btn-sm" CommandName="update" runat="server"/>
                            </div>
                             <div class="col-sm-4"><a href="frmListCategorias.aspx" class="btn btn-danger btn-sm">Cancelar </a></div>
                        </div>
                    </div>
                </div>
            </fieldset>
        </EditItemTemplate>
      <%----------------------------------------------------------------------------------------------%>
        <InsertItemTemplate>
            <fieldset>
                <div class="panel-primary">
                    <div class="panel-heading">
                        <h2 class="panel-title">Editar Categoria</h2>
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-6 control-label">ID: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TxtId" ReadOnly="True" Text="-AUTOMATICO-" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label">Nombre: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TextBox1" Text="<%#BindItem.Nombre %>" CssClass="form-control" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-6 control-label">Descripcion: </label>
                            <div class="col-sm-6">
                                <asp:TextBox ID="TextBox2" Text="<%#BindItem.Descripcion %>" CssClass="form-control" runat="server" TextMode="MultiLine"></asp:TextBox>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <div class="col-sm-4">
                                <asp:Button ID="Button1" Text="Guardar" CssClass="btn btn-success btn-sm" CommandName="insert" runat="server"/>
                            </div>
                             <div class="col-sm-4"><a href="frmListCategorias.aspx" class="btn btn-danger btn-sm">Cancelar </a></div>
                        </div>
                    </div>
                </div>
            </fieldset>
        </InsertItemTemplate>
        
    </asp:FormView>
</asp:Content>
